<extend name="Layout:layout_dialog" />

<block name="body_main">
    <form action="{:U('address_edit_save')}" method="post" class="xsui-form">
        <fieldset>
            <div class="xsui-form-field"><label>联系人：</label><input type="text" name="name" value="{$data.name}" placeholder="联系人" /></div>
            <div class="xsui-form-field"><label>联系电话：</label><input type="text" name="telphone" value="{$data.telphone}" placeholder="联系电话" /></div>
            <div class="xsui-form-field"><label>地区：</label><sohtml:region province="{$data.province}" city="{$data.city}" area="{$data.area}" names="province,city,area" nameattr="id,name" /></div>
            <div class="xsui-form-field"><label>街道：</label><input type="text" name="street" size="41" placeholder="街道" value="{$data.street}"/></div>
            <div class="xsui-form-field"><label>邮政编码：</label><input type="text" name="zip" placeholder="邮政编码" value="{$data.zip}"/></div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>保存</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="customer_id" value="{$data.customer_id}"/>
    </form>
    <input type="hidden" id="hidval_region_api" value="{:U('Area/index','addon=POrgCommonService')}" />
</block>
<block name="body_after">
    <script src="__THEME__Script/jquery-cnregion-1.0/jquery-cnregion-1.0.js" type="text/javascript"></script>
<script type="text/javascript">
    if ($('input[name="isDefault"]').data('value') == '1') {
        $('input[name="isDefault"]').prop('checked', 'checked');
    }
</script>
</block>